package models;

public enum Rank {

	TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE;
	
	public String toString()
	{
		switch (this)
		{
			case TWO: 
				return "two";
			case THREE:
				return "three";
			case FOUR:
				return "four";
			case FIVE:
				return "five";
			case SIX:
				return "six";
			case SEVEN:
				return "seven";
			case EIGHT:
				return "eight";
			case NINE:
				return "nine";
			case TEN:
				return "ten";
			case JACK:
				return "jack";
			case QUEEN:
				return "queen";
			case KING:
				return "king";
			case ACE:
				return "ace";
			default:
				return "";
		}
		
	}
	
	public int toInteger()
	{
		switch (this)
		{
			case TWO: 
				return 0;
			case THREE:
				return 4;
			case FOUR:
				return 8;
			case FIVE:
				return 12;
			case SIX:
				return 16;
			case SEVEN:
				return 20;
			case EIGHT:
				return 24;
			case NINE:
				return 28;
			case TEN:
				return 32;
			case JACK:
				return 36;
			case QUEEN:
				return 40;
			case KING:
				return 44;
			case ACE:
				return 48;
			default:
				return -1;
		}
	}

}
